<?php
/*
 * Created on Apr 3, 2006
 *
 */
 
 
 	require_once('config.php');
 	require_once('functions/general.php');
	require_once('functions/sql.php');
	require_once('sql/sql_incident.php');
	require_once('sql/sql_discussion.php');
	require_once('Smarty.class.php');
	session_start();
	$smarty = new Smarty;
	$smarty->assign('CONFIG', $CONFIG);
	$smarty->template_dir 
		= array('templates', 'templates/overview', 'templates/common/');
	
	$logged_in = logged_in_status($smarty);
	$mysql_link = get_mysql_link();
	
	$incident   = new Sql_incident($mysql_link);
	$discussion = new Sql_discussion($mysql_link);

	$incidents_list = $incident->get_last(0, $CONFIG['overview_latest']);
	$posts_list     = $discussion->simple_overview($CONFIG['overview_latest']);


	$smarty->assign('incidents', $incidents_list);
	$smarty->assign('posts', $posts_list);
	
	$smarty->display('overview.tpl');
	
?>
